The invention relates to a method and arrangement for encoding images.
Advanced digital compressions systems such as MPEG and H.263 are entering the consumer market. The consumer acceptation of these technologies relies considerably on the possibility of substantially reducing of the implementation costs. One of the important factors is the amount of memory that encoders and decoders need for storing reference frames of the video signal. Low-cost and high-quality memory embedded compression techniques can be designed to reduce said memory capacity. Similar techniques can advantageously be used in other video enhancement circuits in which large amounts of memory are required.
However, the invention is not restricted to memory embedded compression circuits. The invention can also be used for reducing the video bandwidth prior to transmission over a (local) channel having a low capacity.
Most known embedded compression schemes are based on a feed-forward coding mechanism. The principal idea behind feed-forward coding is to compress small sub-images, called segments, into a fixed number of bits. The video data is decorrelated by an orthogonal transform (usually the Discrete Cosine Transform DCT). The DCT-coefficients are to be quantized such that a fixed compression factor is achieved for each segment. To this end, a number of quantization strategies are analyzed, and the strategy is chosen that ensures that the compression factor for each sub-image is closest to the target compression factor but does not exceed it.
It is an object of the invention to provide a method and arrangement with which the quality of encoding is improved without exceeding the overall target compression factor. To this end, the method in accordance with the invention comprising the steps of:
dividing each image into a plurality of segments;
encoding segments into variable numbers of bits less than a target bit cost;
counting the number of spare bits of the target bit cost not used for encoding the segments;
enlarging the target bit cost by said number of spare bits for segments if encoding said segments requires a quantization which is coarser than a predetermined quantization.
With the invention is achieved that a variable compression scheme per segment is employed. The spare bits unused by other segments are used to enhance the quality of segments that have a high activity by decreasing the quantization coarseness of said segments. The spare bits are only used if the quantization is coarser than an average quantization. In this way, the quality enhancement of the segments already having a high quality is prevented.